<style type="text/css">
table {
	border-left:0px solid #777;
	border-top:0px solid #777;
	border-collapse:collapse;
	background:#fefffc;
	color:#333;
	font-size:12px;
}
table tr {
	border-top:1px dashed #aaa;
}
#tbl {
	border:0px;
}
table td,table th {
	border-right:0px solid #777;
	border-bottom:0px solid #777;
	padding:4px;
	text-align:left;
}
table th {
	background:#f6fcf5;
}
</style>
<script type='text/javascript' src='./scripts/jquery.js'></script>
<script type='text/javascript' src='./scripts/json.js'></script>
<body id="bb">
<table id="tbl">
<thead id="th">
</thead>
<tbody id="tb">
</tbody>
</table>
<script type='text/javascript'>
$(document).ready(init);
function init() {
	$("#jsonclick").bind("click",function(){
			$.ajax({
			type:"post",
			url:"index.php?Controller=UserAdmin&Action=UserList", 
			data:"page=1&pageSize=20",
			success:function (msg) {
					jsondata = msg.parseJSON();
					parseTable(jsondata);
			}
			});
	});
	function parseTable(data) {
	var code = thcode = '';
	thcode = "<tr><th><input type='checkbox' id='sel_all' /></th>";
	for(p in data[0]) {
	if(p!=='toJSONString' &&  p!=='uid') 
		thcode +="<th>"+p+"</th>";
	}
	thcode +="</tr>";
	for(var i=0;i<data.length;i++) {
		code +="<tr><td><input type='checkbox' name='sel_all'  value='"+data[i]['uid']+"' /></td>";
		for(p in data[i]) {
			if(p!=='toJSONString' &&  p!=='uid') 
			code +="<td>"+data[i][p]+"</td>";
		}
		code +="</tr>";
	}
	$("#tb").append($(code));
	$("#th").append($(thcode));
	}
}
</script>
<input type="button" id="jsonclick" value="UserList" />
</body>